package com.sa.user.api.feignapi;

import com.sa.user.api.dto.RoleDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author Architecture Station
 * @version 1.0
 * @website 
 */
@FeignClient(name = "user-service")
public interface RoleApi {

    @GetMapping("/api/roles/{userId}/roles")
    public List<RoleDTO> loadRoles(@PathVariable long userId);

    @GetMapping("/api/roles")
    public List<RoleDTO> loadAllRoles();
}
